import { Toast } from "vant";
export default {
  components: {},
  props: {},
  data() {
    return {
      Title: '协议',
      contents: ''
    };
  },
  activated() {
    console.log(this.$route.params,'reallllllll');
    this.getData();
    // this.type = this.$route.params.type;
    // this.orderId = this.$route.params.orderId;
  },

  methods: {
    getData() {
        var that = this;
      $http.get("member.member-info.platform-agreement").then(res => {
        console.log(res,'获取协议');
        if (res.result == 1) {
            that.contents = res.data.content;
            that.Title = res.data.title;
        //   return this.$toast(res.msg);
        }
        
      });
      retun
        var e = this, n = "";
        n = "user" == this.data.type ? "member.member-info.register-agreement" : "member.member-info.platform-agreement";
        var o = t.getNetAddresss(n);
        t._getNetWork({
            url: o,
            success: function(t) {
                var n = t.data;
                1 == n.result ? (e.setData({
                    content: n.data.content,
                    title: n.data.title
                }), wx.setNavigationBarTitle({
                    title: e.data.title
                })) : wx.showToast({
                    icon: "none",
                    title: n.msg,
                    duration: 1500
                });
            },
            fail: function(t) {
                console.log(t);
            }
        });
    }
   
  }
};
